import serviceAxios from "@/http/index";


export const getProductClass = (params) => {
    return serviceAxios({
        url: "addons/ldcms/api.v1/category",
        method: "get",
        params,
    });
}

export const getProductList = (params) => {
    return serviceAxios({
        url: "addons/ldcms/api.v1/productLists",
        method: "get",
        params,
    });
}

export const getProductDetail = (params) => {
    return serviceAxios({
        url: "addons/ldcms/api.v1/productDetail",
        method: "get",
        params,
        useTokenAuthorization:true
    });
}

export const getProductArr = () => {
    return serviceAxios({
        url: "addons/ldcms/api.v1/productAttr",
        method: "get",
    });
}

export const getPreviewProductDetail = (params) => {
    return serviceAxios({
        url: "addons/ldcms/api.v1/previewProductDetail",
        method: "get",
        params,
        useTokenAuthorization:true
    });
}